#include "top_widget.h"

Top_Widget::Top_Widget(QWidget *parent):QWidget(parent)
{
    setFixedSize(550,36);
    setAutoFillBackground(true);
    QWidget *widget = new QWidget(this);
    widget->setFixedSize(550,36);
    widget->move(0,0);


    icon_label = new QLabel(this);
    icon_label->setFixedSize(16,16);
    icon_label->setPixmap(QPixmap(":/qmfile/res/icon-tip.png"));

    tip_label = new QLabel(this);
    tip_label->setText(tr("The system is being upgraded, do not manually shut down or restart unless prompted during the update process!"));
    QHBoxLayout *hlayout= new QHBoxLayout();
    hlayout->addSpacing(20);
    hlayout->addWidget(icon_label);
    hlayout->addSpacing(2);
    hlayout->addWidget(tip_label);
    hlayout->addStretch();
    hlayout->setContentsMargins(0,0,0,0);
    setLayout(hlayout);
}

Top_Widget::~Top_Widget()
{
    delete this;
}
